/
...
/
/
Branching Exercise
Search
Try Notion
Branching Exercise
Part I
Answer the following questions:
What git command creates a branch?
What is the difference between a fast-forward and recursive merge?
What git command changes to another branch?
What git command deletes a branch?
How do merge conflicts happen?
Part II
Practice with fast forward and recursive merges! Make a branch and add and commit onto it and merge it back into master.
Try to create your own merge conflict by modifying the same file on two separate commits on two separate branches.
Solution
Part I
What git command creates a branch? git checkout -b
What is the difference between a fast-forward and recursive merge? fast forwards can only happen if there have not been commits on the original branch while the new branch is being worked on
What git command changes to another branch? git checkout
What git command deletes a branch? git branch -D
How do merge conflicts happen? When Git can not determine what file or folder to choose when merging since there have been different commits with changes to the same file